package com.gome.ocean.service.task;

import org.quartz.JobExecutionException;

import com.gome.ocean.dao.model.datax.JobBO;

/**
 * 执行一次
 * 
 * @author haqiaolong 2016年5月26日 下午6:00:01
 * @since 5.0.0
 */
public class OneWayTask extends TransferJobTask implements Runnable {

    private Long id;

    public OneWayTask(JobBO jobBO){
        super.jobBO = jobBO;
        this.id = jobBO.getId();
    }

    public Long getId() {
        return id;
    }

    @Override
    public void run() {
        try {
            if (checkTask()) {
                initTask();
                runTask();
            }
        } catch (JobExecutionException e) {
            LOG.error("任务执行失败！请检查！exception:" + e);
        }
    }

}
